package com.ytrsoft.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.v3.oas.annotations.media.Schema;

@Schema(description = "消息状态")
public enum MessageStatus {
    @Schema(description = "未读")
    UNREAD(),
    @Schema(description = "已读")
    READ(),
    @Schema(description = "已撤回")
    WITHDRAWN(),
    @Schema(description = "已删除")
    DELETE();

    @JsonCreator
    public static MessageStatus enumCreator(String name) {
        return MessageStatus.valueOf(name);
    }
}
